package org.log.server;


import com.alibaba.dubbo.config.annotation.Service;
import org.example.common.LogisticsService;
import org.example.model.Logistics;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Service
public class LogisticsServiceImpl implements LogisticsService {

    public List<Logistics> getLogisticsById(Long orderId) {
        //  模拟查数据库or缓存
        List<Logistics> list = new ArrayList<Logistics>(5);
        Logistics logistics = null;
        for (int i =0; i<5; i++){
            logistics = new Logistics();
            logistics.setId(i+ 1L);
            logistics.setCurrentCity("北京市");
            logistics.setDateTime(new Date());
            logistics.setDesc("当前快件已到达【北京市】，下一站【您家】");
            list.add(logistics);
        }
        return list;
    }
}
